/** 
    
    This file is part of Critter.
    
    Copyright (c) 2009 Robin Southern, http://www.nxogre.org
    
    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:
    
    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.
    
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE.
    
*/

                                                                                       

#ifndef CRITTER_ANIMATEDCHARACTER_DESCRIPTION_H
#define CRITTER_ANIMATEDCHARACTER_DESCRIPTION_H

#include "CritterStable.h"
#include "CritterCommon.h"

#include "NxOgreCharacterControllerDescription.h"

                                                                                       

namespace Critter
{

class CritterPublicClass AnimatedCharacterDescription : public NxOgre::CharacterControllerDescription
{
  
 public:
  
  /** \brief AnimatedCharacterDescription constructor
  */
  AnimatedCharacterDescription();
  
  /** \brief AnimatedCharacterDescription destructor
  */
 ~AnimatedCharacterDescription();
  
  /** \brief Reset the RigidBodyPrototype and OGRE3D bits to it's default state.
  */
  void reset();
  
  /** \brief Does the prototype's variables are in the range of acceptable values?
  */
  bool valid();
  
  /** \brief SceneNode to use, or NULL to create.
  */
  Ogre::SceneNode* mNode;
  
  /** \brief What to do the Node when the Body is destroyed.
  \default Enums::SceneNodeDestructorBehaviour_Destroy
  */
  Enums::SceneNodeDestructorBehaviour mSceneNodeDestructorBehaviour;

  /*! variable. mRenderPriority
      desc.
         Drawing priority
  */
  NxOgre::Enums::Priority mRenderPriority;
  
  /*! variable. mMaxTurningYaw
      desc.
          Maximum amount of yaw per timestep.
      default.
          0.78 rad (~45 degrees)
  */
 NxOgre::Radian mMaxTurningYaw;
 
  /*! variable. mWalkingVelocity
      desc.
          Minimum horizontal velocity whilst the character is not in the air.
      default.
          1.3 m/s
  */
  NxOgre::Real  mWalkingVelocity;

  /*! variable. mRunningVelocity
      desc.
         Maximum horizontal velocity whilst the character is not in the air.
      default.
         5.4 m/s
  */
  NxOgre::Real   mRunningVelocity;

  /*! variable. mJumpVelocity
      desc.
          How much maximum jump velocity should be applied to a character, whilst it is not in the air
          and a jump is requested.
      note.
          Acceleration of gravity is taken into account, and should not be added.
      default.
          1.5 m/s
  */
  NxOgre::Real  mJumpVelocity;

  /*! variable. mHorizontalAirModifier
      desc.
          How much requested horizontal velocity should be applied whilst in the air.
      default.
          0.05 (5%)
  */
  NxOgre::Real  mHorizontalAirModifier;

  /*! variable. mGravityModifier
      desc.
          How much gravity of the scene should be applied to the character.
      default.
          1.0 (100%)
  */
  NxOgre::Real  mGravityModifier;

  /*! variable. mNodeOffset
      desc.
          The offset of the node to the center of the character controller
      default.
          Vec3::ZERO
  */
  NxOgre::Vec3  mNodeOffset;
};

} // namespace

                                                                                       

#endif
